package io.kiki.stack.netty;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Setter
@Getter
public class RpcConfigs {


    /**
     * Channel timeout key in url.
     */
    public static final String Channel_TIMEOUT_KEY = "_CONNECTTIMEOUT";

    /**
     * Channel number key of each address
     */
    public static final String Channel_NUM_KEY = "_channelNUM";

    /**
     * whether need to warm up channels
     */
    public static final String Channel_WARMUP_KEY = "_channelWARMUP";

    /**
     * Whether to dispatch message list in default executor.
     */
    public static final String DISPATCH_MSG_LIST_IN_DEFAULT_EXECUTOR = "rpc.dispatch-msg-list-in-default-executor";
    public static final String DISPATCH_MSG_LIST_IN_DEFAULT_EXECUTOR_DEFAULT = "true";

    /**
     * Whether to enable server SSL support, default is false(disabled).
     */
    public static final String SRV_SSL_ENABLE = "server.ssl.enable";
    /**
     * Whether to enable server SSL client auth, default is false(disabled).
     */
    public static final String SRV_SSL_NEED_CLIENT_AUTH = "server.ssl.clientAuth";
    /**
     * Server SSL keystore file path
     */
    public static final String SRV_SSL_KEYSTORE = "server.ssl.keystore";
    /**
     * Server SSL keystore password
     */
    public static final String SRV_SSL_KEYSTORE_PASS = "server.ssl.keystore.password";
    /**
     * Server SSL keystore type, JKS or pkcs12 for example.
     */
    public static final String SRV_SSL_KEYTSTORE_YPE = "server.ssl.keystore.type";
    /**
     * Server SSL KeyManagerFactory algorithm.
     */
    public static final String SRV_SSL_KMF_ALGO = "server.ssl.kmf.algorithm";
    /**
     * Whether to enable client SSL support, default is false(disabled).
     */
    public static final String CLI_SSL_ENABLE = "client.ssl.enable";
    /**
     * Client SSL keystore file path
     */
    public static final String CLI_SSL_KEYSTORE = "client.ssl.keystore";
    /**
     * Client SSL keystore password
     */
    public static final String CLI_SSL_KEYSTORE_PASS = "client.ssl.keystore.password";
    /**
     * Client SSL keystore type, JKS pkcs12 for example.
     */
    public static final String CLI_SSL_KEYTSTORE_YPE = "client.ssl.keystore.type";
    /**
     * Client SSL TrustManagerFactory algorithm.
     */
    public static final String CLI_SSL_TMF_ALGO = "client.ssl.tmf.algorithm";
}
